<html>
<head><meta charset="utf-8"><title>rust-lang/libz-sys#59 · t-lang/wg-unsafe-code-guidelines · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/index.html">t-lang/wg-unsafe-code-guidelines</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html">rust-lang/libz-sys#59</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="185674538"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185674538" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> JP Sugarbroad <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185674538">(Jan 15 2020 at 07:24)</a>:</h4>
<p>I figure this comes somewhat under the purview of UCG -- is this a reasonable request I'm making? Or is it reasonable for a library to say "you just need to not move this thing, ok?".</p>



<a name="185675298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185675298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185675298">(Jan 15 2020 at 07:40)</a>:</h4>
<p><span class="user-mention" data-user-id="137157">@JP Sugarbroad</span> libz-sys is just directly exposing libz's interface, it doesn't try to be safe at all</p>



<a name="185675307"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185675307" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> comex <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185675307">(Jan 15 2020 at 07:40)</a>:</h4>
<p>and it's not really a UCG issue</p>



<a name="185723978"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185723978" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> JP Sugarbroad <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185723978">(Jan 15 2020 at 17:52)</a>:</h4>
<p>So UCG doesn't try to cover how unsafe code should handle immovable structures?</p>



<a name="185724294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185724294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> JP Sugarbroad <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185724294">(Jan 15 2020 at 17:55)</a>:</h4>
<p>I suppose I could move this to <a class="stream" data-stream-id="219381" href="/#narrow/stream/219381-t-libs">#t-libs</a> instead.</p>



<a name="185729472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185729472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185729472">(Jan 15 2020 at 18:40)</a>:</h4>
<p>UCG is mostly concerned with language-level unsafe, which <code>Pin</code> is not</p>



<a name="185729506"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185729506" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185729506">(Jan 15 2020 at 18:40)</a>:</h4>
<p>so, basically, we mostly care about the list at <a href="https://doc.rust-lang.org/reference/behavior-considered-undefined.html" target="_blank" title="https://doc.rust-lang.org/reference/behavior-considered-undefined.html">https://doc.rust-lang.org/reference/behavior-considered-undefined.html</a> and everything related</p>



<a name="185739754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang/libz-sys%2359/near/185739754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> JP Sugarbroad <a href="https://rust-lang.github.io/zulip_archive/stream/136281-t-lang/wg-unsafe-code-guidelines/topic/rust-lang.2Flibz-sys.2359.html#185739754">(Jan 15 2020 at 20:19)</a>:</h4>
<p>Ok thanks <span aria-label="blush" class="emoji emoji-1f60a" role="img" title="blush">:blush:</span> I'll check with libs team about what they think.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>